package com.raycloud.java.dada.service.inter;

import com.raycloud.java.dada.model.*;
import com.raycloud.java.dada.result.OrderAddResult;
import com.raycloud.java.dada.result.OrderCancelResult;
import com.raycloud.java.dada.result.OrderDeliverResult;
import com.raycloud.java.dada.result.ResultModel;

/**
 * Created by hechuan on 2017/6/21.
 */
public interface OrderService {
    /**
     * 新增订单
     *
     * @param order
     */
    public OrderAddResult addNewOrder(NewOrder order) throws Exception;

    /**
     * 重发订单
     *
     * @param reAddOrder
     * @return
     */
    public OrderAddResult reAddOrder(ReAddOrder reAddOrder) throws Exception;


    /**
     * 订单预发查询运费
     * @param preAddOrder
     * @return
     * @throws Exception
     */
    public OrderDeliverResult queryDeliverFee(PreAddOrder preAddOrder) throws Exception;

    /**
     * 订单预发布
     *
     * @param orderDeliver
     * @return
     */
    public ResultModel deliveryAddOrder(OrderDeliver orderDeliver) throws Exception;

    /**
     *  增加小费
     * @param orderTips
     * @return
     */
    public ResultModel addTip(OrderTips orderTips)throws Exception;


    /**
     * 在订单待接单或待取货情况下，
     * 调用此接口可取消订单。注意：接单后1－15分钟内取消订单，
     * 运费退回。同时扣除2元作为给配送员的违约金
     *
     * @param orderCancel
     * @return
     */
    public OrderCancelResult cancelOrder(OrderCancel orderCancel) throws Exception;


    /**
     * 商户调用该接口将已发布的订单追加给指定的配送员
     *
     * @param appendOrder
     * @return
     */
    public ResultModel appointOrder(AppendOrder appendOrder) throws Exception;

    /**
     * 取消追加订单给配送员
     *
     * @param cancelAppendOrder
     * @return
     */
    public ResultModel cancelAppointOrder(CancelAppendOrder cancelAppendOrder) throws Exception;


}
